Skip to content

Feature request: Sparse multidimensional array/Enum with tuples #910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tobiasBora opened this issue Apr 6, 2025 · 0 comments
Open

Feature request: Sparse multidimensional array/Enum with tuples #910

tobiasBora opened this issue Apr 6, 2025 · 0 comments

Comments

@tobiasBora
Copy link

tobiasBora commented Apr 6, 2025

I need to index n-dimensional sparse arrays. So, following suggestions from #846 I tried to do:

enum Men = Man({(5,6), (7,12), (12,4)}); array[Men] of var 0..100: age; constraint age[Man((12, 4))] == 42; solve satisfy; output ["age= \(age)"];

Resulting in the error

MiniZinc: type error: set literals cannot contain tuples

Would it be possible to support this kind of use-cases?

NB: this may relate to #511

@tobiasBora tobiasBora changed the title Feature request: Enum with tuples Feature request: Sparse multidimensional array/Enum with tuples Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants